import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {SetupComponent} from './pages/setup/setup.component';
import {DemoComponent} from './pages/demo/demo.component';

// 路由配置
const routes: Routes = [
  {path: 'setup', component: SetupComponent},
  {path: 'demo', component: DemoComponent},
  {path: 'main', redirectTo: '/main', pathMatch: 'full'},
  {path: '', redirectTo: '/main', pathMatch: 'full'}
];

@NgModule({
  imports: [
    RouterModule.forRoot(routes), // 路由注册
  ],
  exports: [
    RouterModule
  ]
})
export class AppRoutingModule {
}
